home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / gt_power / bgfaxa11.zip / BGFAX.TXT < prev    next >
Text File  |  1993-06-10  |  28KB  |  589 lines

  1. BGFAX 1.0 ALPHA 11  THU 10 JUN 93
  2. ---------------------------------
  3.  
  4. Miscellaneous comments and news regarding BGFAX ...
  5.  
  6. a. I've heard reports that Frontdoor 2.20 Beta works with BGFAX
  7. b. The latest beta of GT Power software works with BGFAX
  8. c. I've heard reports that Dutchie 3.0 works with BGFAX (I've never heard
  9.    of this software before though).
  10. d. It seems that putting "+FCLASS=0" in an init string on a Supra causes it
  11.    to reset to factory settings.  +FCLASS=0 is always default anyway, so it
  12.    really isn't necessary to have this on any init string.
  13. e. Some modes don't seem to like multiple fax commands stacked the way I
  14.    listed commands in my sample config files before, the ";" semicolon can
  15.    be used to seperate fax commands on modems such as the Practical (PPI).
  16.  
  17. 1. Numerous people have reported problems regarding environment settings by
  18.    BGFAX.  Because of that, BGFAX now longer attempts to set any environment
  19.    variables.  Now, like FRONTDOOR, it will create a DOBBS.BAT file that is in
  20.    the following format:
  21.  
  22.      C:\BGFAX\EXEBBS 9600 1 783 /RELIABLE
  23.  
  24.    You will need to make a batch file called EXEBBS.BAT (in the BGFAX
  25.    directory) that loads your BBS software like so:
  26.  
  27.      @echo off
  28.      gt1706 %key% /mn /f:%1:%2
  29.      bbs
  30.  
  31.    My BBS software (GT Power) requires it be passed the DCE speed and the
  32.    COM port ... DCE speed is %1, COM port is %2, minutes until the next
  33.    event is %3, and the error-free connection string is %4.
  34.  
  35. 2. Since the BGFAX.LOG contains detailed and debug information that most
  36.    sysops aren't really too interested in (except for curiosity), BGFAX now
  37.    builds a second log file (FAXIN.LOG) in the BGFAX directory that contains a
  38.    single, one-lined entry for every fax received.  Here's a sample:
  39.  
  40. Date  Time  ET    Bytes   Rate  Filename     Remote Fax ID        Pgs  Notes
  41. -------------------------------------------------------------------------------
  42. 06-10 16:22 00:48   31629  9600 FAX0180.QFX  BJ GUILLOT/HOUSTON1    1  Finished
  43. 06-10 16:29 00:55   26654  9600 FAX0181.QFX  BJ GUILLOT/HOUSTON1    2  Finished
  44.  
  45. 3. In frontend mode, added the following commands while waiting for calls
  46.          Ctrl-A ... Force answer (send answer string to modem)
  47.          Ctrl-R ... Reset counters
  48.  
  49. 4. Fixed problem with elapsed time counter.
  50.  
  51. BGFAX 1.0 ALPHA 10  SUN 06 JUN 93
  52. ---------------------------------
  53.  
  54. 1. Found a major bug in REAR END mode.  Alpha 9 apparently was hanging up
  55.    whenever it loaded.  No longer does this.
  56.  
  57. 2. Many people were reporting they were getting "Unable to set xxxx
  58.    environment variable" because they had too little environment space.  Now,
  59.    BGFAX will beep twice and delay for a second or so if the environment space
  60.    is less than 100 bytes.  This will probably change in the future.  If you
  61.    are getting this, you will need to increase your environment size.  You do
  62.    this in your CONFIG.SYS with the SHELL command, like so:
  63.  
  64.       SHELL=C:\COMMAND.COM /E:xxxx /P
  65.  
  66.    Where "xxxx" is the number of bytes in your environment (I suggest using
  67.    something like 1024).  The /P means that you want the AUTOEXEC.BAT file to
  68.    execute.  (If you don't put it on there, your system will just sit at the
  69.    C:\> prompt after it reboots!)
  70.  
  71. 3. It seems that there are many variations on the "EOL" symbol that marks
  72.    the end of each "scan line" on a fax page.  I have already identified at
  73.    least three types of EOLs.  Does anyone know why there are SO MANY???  I
  74.    thought there was only supposed to be one, but that doesn't seem the case,
  75.    unless I'm misunderstanding something (which is a good possibility).  I
  76.    still need to do a little work on this.
  77.  
  78. 4. May have been a problem with COM4 addresses.  Fixed.
  79.  
  80. BGFAX 1.0 ALPHA 09  THU 03 JUN 93
  81. ---------------------------------
  82.  
  83. THE FORMAT OF THE BGFAX.CNF CONFIG FILE HAS CHANGED, PLEASE TAKE A LOOK AT
  84. THE INCLUDED BGFAX.CNF FILE!!!  Also, for people running in REAR END mode,
  85. only one command line parameter is now required (/FAX or /FCON, the port
  86. and fax type will be determined from the config file).  (The new config
  87. file allows user selectable errorlevels for events now).
  88.  
  89. Also, when working with BGFAX rear end mode, now only one parameter is
  90. needed (the /FAX or /FCON) the fax type and port are now taken out of the
  91. BGFAX.CNF file (you really only need the PO= and FT= entries though if you
  92. will be running in rear end mode.)
  93.  
  94. The errorlevels have changed around, too ... if you had been running a
  95. previous version, you'll have to change your batch files around.
  96.  
  97.        4 - fax was received
  98.        3 - local logon
  99.        2 - data call
  100.        1 - restart batch file
  101.  
  102. 1. I found out BGFAX was not working with COM3 and COM4.  Fixed now.
  103.  
  104. 2. For people using BGFAX in frontend mode, the number of rings to answer
  105.    on is now configurable.  I'll probably stick to answering on one ring
  106.    myself, but some people may want to use 2 rings (or more).  It should be
  107.    noted that some older fax cards (like "The Complete Fax" and its
  108.    cousins, "The Complete Communicator", etc.) won't send out a fax CNG
  109.    tone until after the second ring.  Also, areas that have Caller ID, will
  110.    have the caller ID information logged into the BGFAX.LOG if you specify
  111.    to answer on the second ring if your modem allows this.  (I belive some
  112.    Rockwell based modems, such as the Supra, will use Caller ID when the
  113.    command AT#CID=1 is used in one of the initialization strings.)
  114.  
  115. 3. I finally figured out how to calculate the scan lines per page of a fax
  116.    image.  The numbers will be displayed on the screen when a fax is begin
  117.    received, and the proper values will be placed the in QFX file header (if
  118.    you choose to use the QFX format.)  "lct" on the display will mean "scan
  119.    line count."  Different fax softwares seem to send the EOL in different
  120.    ways, and I've tried to account for the two ways I've seen so far.
  121.  
  122. 4. The calculation of the cps speed has changed somewhat.  It will now
  123.    calculate the average cps for the current page rather than the
  124.    instatanteous cps for the current block of data being written to disk.
  125.  
  126. BGFAX 1.0 ALPHA 08  SUN 30 MAY 93
  127. ---------------------------------
  128.  
  129. BGFAX alpha 7 was compressed with the EXE compressor DIET 1.44, and it
  130. seemed that 486 systems didn't like my compressed EXE that much, so all
  131. future versions will remain uncompressed.
  132.  
  133. 1. Fixed a bug that caused system to hang when null remote fax ID string
  134.    received.  (Alpha 7 would get stuck in an infinite loop trying to delete
  135.    spaces from a non-existant string.)
  136.  
  137. 2. The log will now indicate whether the fax document was incomplete.
  138.    Sometimes a +FHNG:102 occurs (which indicates an error), but the fax
  139.    document still goes through.  However, using another method, it is possible
  140.    to determine if all pages were in fact received.
  141.  
  142. 3. Added "cps" to display screen while receiving a fax.  The "cps" reading
  143.    measures only the actual data transmitted during a fax page stream, not the
  144.    actually handshaking, etc.  On a 9600 bps fax receiption, my Supra was
  145.    registering a cps rate of 1240+, which seems a little higher than I thought
  146.    it should be getting, so my routines might not calculate it right.
  147.  
  148. BGFAX 1.0 ALPHA 07  FRI 28 MAY 93
  149. ---------------------------------
  150.  
  151. A few people have had trouble getting BGFAX to work with PC Board 15 Beta
  152. and Intermail in "rear end" mode.  I've had reports that confirm that BGFAX
  153. works with these two products, but sometimes people have trouble because
  154. they forget to put the important "+FCR=1" string somewhere in the PC Board or
  155. Intermail initialization strings.  +FCR=1 enables fax receiption, and even if
  156. you put the +FAA=1 (which enables adaptive answering), some fax modems
  157. (like the Supra) will not take a fax without +FCR=1.
  158.  
  159. 1. I wasn't correcting identifying all types of ARQ strings during Frontend
  160.    mode.  Now, any CONNECT string with the following strings will be
  161.    treated as ARQ (this is after 'CONNECT' is stripped):
  162.  
  163.       ARQ  REL  42  EC  M
  164.  
  165. 2. I have made the program look more professional.  (Many cosmetic changes
  166.    during the actual BBS call/Fax call process.)
  167.  
  168. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  169.  
  170.    For those of you not on my Internet mailing list, here is a copy of a
  171.    progress report sent to all of them regarding BGFAX Alpha 6.
  172.  
  173. BGFAX ALPHA 6 ... PROGRESS REPORT ... GOOD NEWS AFTER THIS 1st PARAGRAPH
  174.  
  175. Well, I spent all day today trying to test BGFAX rear end mode in a real
  176. operation environment.  I tried messing with Binkley, but couldn't even
  177. get the thing to recognize a RING.  (Remember I have no experience with
  178. FidoNet what-so-ever, so I know nothing about this mailers.)  I tried my
  179. hand at Frontdoor again, and was finally successful at getting it to exit
  180. with an errorlevel on FAX calls, BUT ... Frontdoor takes its sweet time
  181. just sitting there twiddling its thumbs, and before it even exits to BGFAX,
  182. the remote fax modem will already give up because its too long a wait!  I
  183. know someone who is a Frontdoor beta tester and will try to see if he can
  184. get a message to the author so that we can fix this.  (This is the non-
  185. commerical version of Frontdoor, by the way.)
  186.  
  187. Anyway, I got a lead from something about a trial version of the commerical
  188. Intermail.  I found a copy of IM221APR.ZIP on a local BBS in Houston.  It's
  189. a trial version that expires 4/30/93, so I had to set my clock back to use
  190. it, BUT ... I got it to work with BGFAX successfully!!!  (The fellow that
  191. told me about Intermail says the version he had was IM221JUN.ZIP that
  192. doesn't expire until the end of June, so maybe we can find that one.)
  193.  
  194. Intermail looks VERY similar to Frontdoor.  Can someone tell me if these
  195. programs are related in any way?
  196.  
  197. Anyway, here is the relevent info for setting up BGFAX in rear end mode
  198. with the trial version of Intermail that expires 4/30/93.  I configured it
  199. to work with my SupraFax Modem.  (It's the v.32bis external, 1.7B4 ROMs).
  200.  
  201. IMSETUP.EXE ... Modem -> Advanced setup -> Command strings
  202.  
  203. Init-1     ATZ|
  204. Init-2     AT&K3+FCLASS=0+FCR=1|             (+FCR=1 is VERY important)
  205. Init-3     AT+FLID="TRANQUILITY BASE"|
  206.  
  207. IMSETUP.EXE ... Modem -> Advanced setup -> Answer control
  208.  
  209. Manual answer    Yes
  210. Force answer     AT+FAA=1A|  (that's all that will fit, I know the ZyXEL
  211.                              modem likes AT+FAA=1 A| with a space, so
  212.                              ZyXEL owners may want to add +FAA=1 to one
  213.                              of the init strings and just use ATA|)
  214.  
  215. IMSETUP.EXE ... Modem -> Advanced setup -> Connect strings
  216.  
  217. You will see a list of 14 or so preconfigured connect strings, press
  218. <INSERT> to add one, and set it up like so:
  219.  
  220.   Connect Message                          Speed  EC  BBSexit  Terminate
  221.  
  222.   FAX                                      19200  N   0        123
  223.  
  224. -------------------------------------------------------------------------
  225.  
  226. "FAX" is the string my SupraFax Modem returns when it hears the Fax CNG
  227. tone from the remote modem/machine.  I belive the ZyXEL returns "CONNECT
  228. FAX", and some modems return "CONNECT 9600/FAX", etc.  You will have to
  229. find out which your modem uses.
  230.  
  231. Notice that "BBSexit" is equal to ZERO.  It should stay like that!  Notice
  232. that "Terminate" is equal to "123".  This number can be set to whatever you
  233. want as long as its NOT ZERO (and any other value Intermail is picky
  234. about).  I set it so that when Intermail receives the string "FAX" it will
  235. IMMEDIATELY exit with an errorlevel of 123.  (Notice IMMEDIATELY, it
  236. doesn't twiddle around like Frontdoor).
  237.  
  238. Here's the sample testing batch file I used for BGFAX, IMBATCH.BAT:
  239.  
  240. @echo off
  241. im
  242. if errorlevel 123 goto fax
  243. goto end
  244. :fax
  245.   bgfax 1 z /fax
  246. :end
  247. imbatch
  248.  
  249. Notice I don't include any BBS handling errorlevel instructions.  You'll
  250. have to do that yourself (it's all configured in "Connect strings").
  251.  
  252. By the way, I tested this both with and without the BNU fossil driver
  253. loaded.  (Note that BGFAX does not use a fossil driver.  Also note that
  254. Intermail can use one, but doesn't have to as it has its own SIO
  255. communications routines built-in as well.)
  256.  
  257. ------------------------------------------------------------------------
  258.  
  259. Just for kicks, I decided to test Intermail and BGFAX rear end mode with
  260. the /FCON parameter.  Some fax modems do not transmit any kind of "FAX" or
  261. "CONNECT FAX" warning messages, only the "+FCON" (which means the faxes
  262. have passed first base in their mating game.)  I changed my Intermail setup
  263. string from "FAX" to "+FCON" to do this test.  I also changed my
  264. IMBATCH.BAT file line that read "bgfax 1 z /fax" to "bgfax 1 z /fcon".  The
  265. first fax call attempt I made JUST BARELY made it.  In fact, the fax DCE
  266. downshifted from 9600 to 7200 because my computer (286/8 mhz) was too slow.
  267. I thought that was a miracle.  It should have hung up!  Anyway, I tried
  268. again, and it seemed the disk cache had kicked in, and the transfer went
  269. through.  (Note that I still received the "Computer too slow" message from
  270. BGFAX).  So, you still may want to play around with the trial version of
  271. Intermail.
  272.  
  273. End of Progress Report for 5/26/93.
  274.  
  275. BGFAX 1.0 ALPHA 06  WED 26 MAY 93
  276. ---------------------------------
  277.  
  278. POSSIBLE VERY GOOD NEWS --- THIS RELEASE SUPPORTS "REAR END" OPERATION.
  279.  
  280. I'll list the minor changes first, then discuss "rear end" mode after.
  281.  
  282. 1. A user requested I check for an actual "RING" response from the modem
  283.    because some users don't have the RI (ring indicator) capability that most
  284.    users do that BGFAX uses to determine when to send the answer string to the
  285.    modem.  Anyway, I hope this helps those few that don't have RI.
  286.  
  287. 2. Since Fido mailers can't be rear ended into, I took the "q.,FidoNet"
  288.    line out of the BGFAX.CNF file.  Only one "crash" entry is now available,
  289.    and that is for GT Power sysops, the "CQ,GT Crash call line".  If you were
  290.    running BGFAX alpha 5, just delete the "Q.,FidoNet" line.
  291.  
  292. Now, here come the major changes.  If you want to run BGFAX in frontend
  293. mode, you don't even have to read the following.  However, if you want to
  294. run it in rear end mode, you gotta read through my pitiful docs some more.
  295. I'm typing this at near-midnight hours, so I'm probably going to type
  296. incoherently after a few minutes.
  297.  
  298. First the bad news.  I couldn't get Frontdoor to work on my system so that
  299. it would exit out with an errorlevel if it determined the incoming fax was
  300. a fax call.  However, I hope you will be able to get Frontdoor, or Binkley,
  301. or whatever frontend system you use to do this.  (If you can, drop me a
  302. note so I can try to duplicate it).  So, in order to test the BGFAX "rear
  303. end", I had to write my own psuedo-front end.  This psuedo-front end, BGFFF
  304. can be configured to exit with an errorlevel of 80 when it detects a string
  305. with "FAX" in it (such as "FAX", "CONNECT FAX", "CONNECT 9600/FAX", etc.)
  306. or when it encounters a "+FCON" string.  You specify the choice.
  307.  
  308. Why am I telling you this?  Because, before you go start to play with
  309. Frontdoor, you might want to try to get the BGFAX rear end working with
  310. BGFFF first.  If it works, then try playing with Frontdoor.
  311.  
  312. BGFFF is very simple to use.  It has three command line parameters.
  313.  
  314.     BGFFF 1 38400 /FAX     or     BGFFF 1 38400 /FCON
  315.  
  316. The first parameter is the com port, the second is the DTE rate you want to
  317. lock it at.  The third can be either "/FAX" or "/FCON".  If you specify
  318. /FAX, BGFFF will exit with an errorlevel of 80 when it encounters the "FAX"
  319. string.  Try this one first.  (See the included FFF.BAT file).  After that,
  320. change the FFF.BAT file so that you use /FCON in the two places where /FAX
  321. is specified.  In /FCON mode, BGFFF will wait until it receives a +FCON
  322. from the port.  Make a note of which methods work and don't work.  If
  323. you're lucky, both methods will.  You can get read of the FFF.BAT and
  324. BGFFF.EXE after these tests.  If both pass, you have a pretty good chance
  325. of being able to use rear end mode of BGFAX in a Fido mailer.
  326.  
  327. To run BGFAX is rear end mode, it requires three parameters as well.  A
  328. BGFAX.CNF FILE IS NOT REQUIRED FOR REAR END OPERATION.  Recall that no
  329. command line parameters are required to run BGFAX in front end mode.
  330.  
  331.     BGFAX 1 Z /FAX
  332.  
  333. That means use COM1, ZyXEL Z-FAX format fax files, and the /FAX means that
  334. Frontdoor/Binkley/etc. was able to detect the "FAX" string from your modem
  335. properly.
  336.  
  337. If you are using a ZyXEL modem, you will have to put an e-point after the
  338. COM port, like so:  BGFAX 1! Z /FAX   this would tell BGFAX *not* to shift
  339. DTE to 19200 after the +FCON message is received.  (However, ZyXEL users
  340. can already use ZyXEL's RCVFAX program to do this, so it's not really
  341. necessary to use BGFAX unless you just want something to do for fun.)
  342.  
  343. If your Fido frontend is unable to detect the "FAX"-like string, but will
  344. detect the +FCON message (by the way, some FaxModems do not even return a
  345. "FAX"-like string, only the "+FCON"), you will have to use the /FCON
  346. paramateer on BGFAX like so:   BGFAX 1 Z /FCON
  347.  
  348. If your Frontend and modem will allow you to use /FAX parameter on BGFAX,
  349. USE IT.  AVOID HAVING TO USE THE /FCON PARAMETER.  However, some people
  350. will have to use it.
  351.  
  352. Remember, BGFFF is only for testing BGFAX's rear end capability on your
  353. modem.  It is not needed after you use it for the initial testing.
  354.  
  355. Again, if you actually get BGFAX working in rear end mode with something
  356. besides BGFFF, *please* let me know.  Send me your batch files, config
  357. files from Frontdoor, etc., and let me know what kind of modem you use.
  358.  
  359. Special note.  I had this file ARJed up and all ready to go on the FTP when
  360. I tried a few last minute tests.  Turned out, the rear end mode wasn't
  361. working too hot on my 2400 S/R faxmodem, so I changed a few routines
  362. around.  What's quite interesting though is that my 2400 modem doesn't
  363. issue a "FAX" command, so it would be logical to think you would have to
  364. use the /FCON switch.  Well, turns out that BGFAX works best with my 2400
  365. S/R fax modem when used with the /FAX switch.  WEIRD, HUH?  Oh well, this
  366. might just be something you have to try, too.
  367.  
  368. By the way, these BBS systems on the other continent should also carry
  369. BGFAX in the future as a downloadable file.
  370.  
  371. The Owl's Nest (Dutch Supra Distr) Support BBS has 3 numbers;
  372.  
  373. (31)-(0)2155-10921   (Also fidonet node 2:512/39)
  374. (31)-(0)2155-12571   Node 2
  375. (31)-(0)2155-28096   Node 3
  376.  
  377. All three with Supra V.32bis
  378.  
  379. BGFAX 1.0 ALPHA 05  SAT 22 MAY 93
  380. ---------------------------------
  381.  
  382. 1. Fixed some problems with faxes having single trashed lines.  Seems I was
  383.    writing 2049 bytes to the file when I only had 2048 bytes in my disk write
  384.    buffer.  Oops.
  385.  
  386. 2. NOTE FOR ZYXEL USERS: You must change the DTE rate in the BGFAX.CNF file
  387.    so that you have a e-point (bang, "!") after it.
  388.  
  389.       1
  390.       38400!
  391.       ATZ
  392.  
  393.    The e-point will make BGFAX *not* shift the DTE to 19200 when fax
  394.    receiption begins.  Seems ZyXEL conveniently forgot to do this.  This is
  395.    actually a better idea than what CCITT recommends doing (why, oh why did
  396.    they want the DTE to be shifted to 19200) and that's why ZyXEL users
  397.    have such an easy time with fax receiption.  The other guys, like me,
  398.    don't have ZyXEL's though, so don't add the "!" if you don't.
  399.  
  400. 3. If one of the three modem initialization strings are less than two
  401.    characters, the string will not be sent to the modem.  (If the line just
  402.    read "AT", it would not get sent).
  403.  
  404. 4. If you don't want your users to have to hit <Esc> to enter the BBS, ie.,
  405.    you want to it load automatically, change the line in the BGFAX.CNF file
  406.    that says "Press <esc> to blah blah blah", so that it says "<load>" as the
  407.    first thing on the line.
  408.  
  409. 5. Look at the included BGFAX.CNF file.  A line has been added ... see:
  410.  
  411.      Please wait loading the bulletin board.
  412.      /RELIABLE                                        <-- new line
  413.      2400
  414.      We're sorry, but we do not accept calls below 2400.
  415.  
  416.    The new line can contain anything you want.  What happens is when a data
  417.    call is detected, if it is an error correcting modem (ie., it is
  418.    something like CONNECT 2400/ARQ, /REL, or 2400/EC), it will set the
  419.    environment variable called ARQ to whatever is on the line.  So, in the
  420.    case of "CONNECT 14400/ARQ", the following environment gets set:
  421.  
  422.         DCE=14400
  423.         ARQ=/RELIABLE
  424.  
  425. 6. Another new environment variable is now set.  The "EVT" variable will
  426.    be set to the number of minutes (minus three) until the next event.
  427.    This is set on both local logins and data calls.
  428.  
  429. BGFAX 1.0 ALPHA 04  FRI 21 MAY 93
  430. ---------------------------------
  431.  
  432. BGFAX alpha 1 through 3 were non-public releases.  This is a public
  433. release.  Send all bug reports to ... (my name is B.J. Guillot) ...
  434.  
  435. Internet: st1r8@jetson.uh.edu
  436. GT/Power: Net/Node 001/040
  437.    Voice: 713-893-9320
  438. Data/Fax: 713-893-9124
  439.  
  440. I am a terrible doc writer.  You'll believe me by the time you finish
  441. reading this, if you can make it that far.  :)
  442.  
  443. BGFAX is a program designed for BBS operators that have Class 2 compliant
  444. fax modems that support adaptive answering.  The only modems that I've been
  445. able to test it on so far include the SupraFax 14.4, Practical Periperhals,
  446. and an el-cheapo Computer City generic 2400 data, 9600 S/R fax modem.  It
  447. seems to work on all of these.
  448.  
  449. DISCLAIMER: I'm not responsible for ANYTHING negative that happens to you
  450. or your computer system or your business, etc., etc., etc.
  451.  
  452. The program does not require a FOSSIL driver as it has communications
  453. routines built into it.  Yes, it supports the FIFO buffer of the 16550
  454. UART chip.
  455.  
  456. Here is how the program works:
  457.  
  458. It is to be ran as a "frontend" system to your BBS.  When it starts, it
  459. will initialize the modem and wait for the modem to ring.  When it does
  460. ring, it will send the modem answer string to the modem.  It the modem
  461. determines it is a data call, it will ask the user to press <ESC> to log
  462. onto the system.  It will also look for "CQ" or "q." and exit with a
  463. specific errorlevel if one of those strings is encountered.  I am not sure
  464. as it the "q." determination is really meaningful, though.
  465.  
  466. If your modem detects a fax call, BGFAX will attempt to take the fax.
  467. Please note that depending on the type of modem you have and the way it
  468. determines adaptive answering, human faxes (ie., non fax-modems) may not
  469. understand how to send a fax to you.  This seems to be the case with my
  470. Uncle.  He tried to send me a fax the other day on his fax machine, but he
  471. waits until he hears a fax tone on the other end before pressing his
  472. "START" button.  So, my Supra never heard the CNG tones from his machine
  473. until after the Supra modem decided it was already a data call.  I've heard
  474. that some modems will shift into FAX mode anytime a CNG tone is heard, but
  475. I just wanted to tell you this in case you had problems.  (To solve the
  476. problem, I told my Uncle to hit the "START" key as soon as he heard the
  477. line start ringing instead of waiting for my modem to start sending tones).
  478.  
  479. YOU NEED TO SET THE BGFAX ENVIRONMENT VARIABLE.
  480.  
  481. It's easy, just say SET BGFAX=C:\BGFAX or some other directory in a batch
  482. file that runs before you run the batch file that runs BGFAX (ie., in your
  483. AUTOEXEC.BAT).
  484.  
  485. All incoming faxes will be received in that directory.  BGFAX.LOG will
  486. reside in that directory, and BGFAX.CNF must exist in that directory.
  487.  
  488. BGFAX.CNF is the configuration file for BGFAX.  Here is the file I use with
  489. my Supra FaxModem:
  490.  
  491. -----<cut>-----
  492. 1
  493. 38400
  494. ATZ
  495. ATH0M1%G1%E0N1\N3&K3+FCLASS=0+FCR=1
  496. AT+FLID="TRANQUILITY_BASE"
  497. AT+FAA=1 A
  498. Please press the [Esc] key to load Tranquility Base.
  499. Loading the bulletin board.  Please wait.
  500. 2400
  501. Calls are not accepted below 2400 bps.  Sorry.
  502. Z
  503. q.,FidoNet crash calls
  504. CQ,GT crash calls
  505. event=07:00
  506. event=00:15
  507. -----<cut>-----
  508.  
  509. Line 1 is the com port number.  Line 2 is the DTE rate you use for your BBS
  510. software.  The next three lines are initialization string lines.  My Supra
  511. seemed to like it with all commands compressed on one line, but I noticed
  512. the Practicial Peripherals was peculiarly picky about packed strings, so
  513. one fax command had to be one a seperate line.  Anyway, if you don't need
  514. three lines for initialization, just put an "AT" on the line.  You'll
  515. notice my second initialization string has a bunch of garbage in it,
  516. "H0M1%G1%E0N1\N3&K3".  These are just commands I use when I want the modem
  517. to be able to answer calls.  You can probably take all that out.  The +F
  518. things are fax commands and should be left alone, except for the +FLID=
  519. command which sets your FAX ID.
  520.  
  521. The line with "2400" by itself lets BGFAX know what the lowest DCE speed
  522. you allow on your BBS.  Set it to "300" if you want all calls.
  523.  
  524. The line with "Z" by itself means you want BGFAX to store fax files with
  525. the ZyXEL ZFAX header record.  (So you can use the public domain ZFAX
  526. program, available by anonymous FTP to view incoming faxes).  The only
  527. other valid entry for this line is a single "Q" which means you want BGFAX
  528. to store the incoming faxes with the Smith Micro Software's QuickLink II
  529. Fax format header, so you view faxes with QL II's "VIEWFAX.EXE" file which
  530. comes with quite a few fax modems (but not all).  Please note that the QL
  531. II header record has a field for "scan lines" and I don't know what to put
  532. in it, so it's being fudged and this may create some side effects, but it
  533. seems that viewing the fax still works fine.
  534.  
  535. Notice there are two "event" lines.  You can have up to 20 of them.  The
  536. first event is Event #0 and will cause BGFAX to exit with an errorlevel of
  537. 50 when the time is encounted for it.  The second event is Event #1 and
  538. will exit with errorlevel 51, etc.  You can have no events by taking out
  539. the event lines.  So far, these "event=" lines are the only flexible lines
  540. in the config file that can be removed without causing BGFAX problems.
  541.  
  542. Here's the batch file I use to run BGFAX:
  543.  
  544. -----<cut>-----
  545. @echo off
  546. bgfax
  547. if errorlevel 255 bbs
  548. if errorlevel 101 gtmail
  549. if errorlevel 100 fidomail
  550. if errorlevel 90 goto faxrcvd
  551. if errorlevel 51 midmaint
  552. if errorlevel 50 maint
  553. if errorlevel 20 goto datacall
  554. if errorlevel 10 goto datacall
  555. goto end
  556. :faxrcvd
  557.   echo fax received as [%fax%]
  558.   echo you can put a printing batch here if you want
  559.   bbs
  560. :datacall
  561.   echo data call received dce=[%dce%]
  562.   %gt% %key% /mn /f:%dce%:1
  563.   bbs
  564. :end
  565. -----<cut>-----
  566.  
  567. Here's a rundown of the errorlevels:
  568.  
  569.   255 ... bad connect, no carrier, bad fax, etc., rerun BBS.BAT
  570.   101 ... mailer software signature #2
  571.   100 ... mailer software signature #1
  572.    90 ... at least a one page fax received, option of going and doing
  573.           something with the fax, filename stored in FAX environment
  574.           varible maintained by BGFAX
  575. 69-50 ... Events #19 through Events #0
  576.    20 ... data call, actual DCE carrier rate set by DCE environment varible
  577.           maintained by BGFAX
  578.    10 ... local logon, handle however your software requires
  579. <no errorlevel> ... terminated by user or something terrible happens :)
  580.  
  581. If sometimes it appears BGFAX gets locked up during a fax receiption,
  582. pressing the <ESC> key should quit BGFAX and leave a DEBUG line that has
  583. whatever was in the modem receive buffer at the time.
  584.  
  585. ------- In the future, I hope to have an alpha out that will allow the use
  586. of another frontend that runs BGFAX when a fax is already ready to come in
  587. on the line.  This version must be run as a frontend, though!
  588.  
  589.